<html>
<body>
Reports return of, or assignment from a method parameter to an array or a mutable type like
<code>Collection</code>, <code>Date</code>, <code>Map</code>, <code>Calendar</code>, etc.
<p>Because such types are mutable, this construct may
  result in unexpected modifications of an object's state from outside the owning class. Although this construct may be useful for
  performance reasons, it is inherently prone to bugs.</p>
<p>The following mutable types are reported:</p>
<ul>
  <li><code>java.util.Date</code></li>
  <li><code>java.util.Calendar</code></li>
  <li><code>java.util.Collection</code></li>
  <li><code>java.util.Map</code></li>
  <li><code>com.google.common.collect.Multimap</code></li>
  <li><code>com.google.common.collect.Table</code></li>
</ul>
<p>The quick-fix adds a call to the field's <code>.clone()</code> method.</p>
<p><b>Example:</b></p>
<pre><code>
  class Log {
    String[] messages;
    ...

    String[] getMessages() {
      return messages; // warning: Return of String[] field 'messages'
    }
  }
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
  class Log {
    String[] messages;
    ...

    String[] getMessages() {
      return messages.clone();
    }
  }
</code></pre>
<!-- tooltip end -->
<p>Use the <b>Ignore assignments in and returns from private methods</b> option to ignore assignments and returns in <code>private</code> methods.

  <!--<p><small>New in 2017.3</small>-->
</body>
</html>